3.1.7 \(\int \frac {(a+b x^2) (c+d x^2)}{(e+f x^2)^3} \, dx\) [7]

Optimal. Leaf size=130 \[ -\frac {(d e-c f) x \left (a+b x^2\right )}{4 e f \left (e+f x^2\right )^2}-\frac {(b e (3 d e+c f)-a f (d e+3 c f)) x}{8 e^2 f^2 \left (e+f x^2\right )}+\frac {(b e (3 d e+c f)+a f (d e+3 c f)) \tan ^{-1}\left (\frac {\sqrt {f} x}{\sqrt {e}}\right )}{8 e^{5/2} f^{5/2}} \]

[Out]

-1/4*(-c*f+d*e)*x*(b*x^2+a)/e/f/(f*x^2+e)^2-1/8*(b*e*(c*f+3*d*e)-a*f*(3*c*f+d*e))*x/e^2/f^2/(f*x^2+e)+1/8*(b*e
*(c*f+3*d*e)+a*f*(3*c*f+d*e))*arctan(x*f^(1/2)/e^(1/2))/e^(5/2)/f^(5/2)

________________________________________________________________________________________

Rubi [A]
time = 0.07, antiderivative size = 130, normalized size of antiderivative = 1.00, number of steps used = 3, number of rules used = 3, integrand size = 24, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.125, Rules used = {540, 393, 211} \begin {gather*} \frac {\text {ArcTan}\left (\frac {\sqrt {f} x}{\sqrt {e}}\right ) (a f (3 c f+d e)+b e (c f+3 d e))}{8 e^{5/2} f^{5/2}}-\frac {x (b e (c f+3 d e)-a f (3 c f+d e))}{8 e^2 f^2 \left (e+f x^2\right )}-\frac {x \left (a+b x^2\right ) (d e-c f)}{4 e f \left (e+f x^2\right )^2} \end {gather*}

Antiderivative was successfully verified.

[In]

Int[((a + b*x^2)*(c + d*x^2))/(e + f*x^2)^3,x]

[Out]

-1/4*((d*e - c*f)*x*(a + b*x^2))/(e*f*(e + f*x^2)^2) - ((b*e*(3*d*e + c*f) - a*f*(d*e + 3*c*f))*x)/(8*e^2*f^2*
(e + f*x^2)) + ((b*e*(3*d*e + c*f) + a*f*(d*e + 3*c*f))*ArcTan[(Sqrt[f]*x)/Sqrt[e]])/(8*e^(5/2)*f^(5/2))

Rule 211

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(Rt[a/b, 2]/a)*ArcTan[x/Rt[a/b, 2]], x] /; FreeQ[{a, b}, x]
&& PosQ[a/b]

Rule 393

Int[((a_) + (b_.)*(x_)^(n_))^(p_)*((c_) + (d_.)*(x_)^(n_)), x_Symbol] :> Simp[(-(b*c - a*d))*x*((a + b*x^n)^(p
 + 1)/(a*b*n*(p + 1))), x] - Dist[(a*d - b*c*(n*(p + 1) + 1))/(a*b*n*(p + 1)), Int[(a + b*x^n)^(p + 1), x], x]
 /; FreeQ[{a, b, c, d, n, p}, x] && NeQ[b*c - a*d, 0] && (LtQ[p, -1] || ILtQ[1/n + p, 0])

Rule 540

Int[((a_) + (b_.)*(x_)^(n_))^(p_)*((c_) + (d_.)*(x_)^(n_))^(q_.)*((e_) + (f_.)*(x_)^(n_)), x_Symbol] :> Simp[(
-(b*e - a*f))*x*(a + b*x^n)^(p + 1)*((c + d*x^n)^q/(a*b*n*(p + 1))), x] + Dist[1/(a*b*n*(p + 1)), Int[(a + b*x
^n)^(p + 1)*(c + d*x^n)^(q - 1)*Simp[c*(b*e*n*(p + 1) + b*e - a*f) + d*(b*e*n*(p + 1) + (b*e - a*f)*(n*q + 1))
*x^n, x], x], x] /; FreeQ[{a, b, c, d, e, f, n}, x] && LtQ[p, -1] && GtQ[q, 0]

Rubi steps

\begin {align*} \int \frac {\left (a+b x^2\right ) \left (c+d x^2\right )}{\left (e+f x^2\right )^3} \, dx &=-\frac {(d e-c f) x \left (a+b x^2\right )}{4 e f \left (e+f x^2\right )^2}-\frac {\int \frac {-a (d e+3 c f)-b (3 d e+c f) x^2}{\left (e+f x^2\right )^2} \, dx}{4 e f}\\ &=-\frac {(d e-c f) x \left (a+b x^2\right )}{4 e f \left (e+f x^2\right )^2}-\frac {(b e (3 d e+c f)-a f (d e+3 c f)) x}{8 e^2 f^2 \left (e+f x^2\right )}+\frac {(b e (3 d e+c f)+a f (d e+3 c f)) \int \frac {1}{e+f x^2} \, dx}{8 e^2 f^2}\\ &=-\frac {(d e-c f) x \left (a+b x^2\right )}{4 e f \left (e+f x^2\right )^2}-\frac {(b e (3 d e+c f)-a f (d e+3 c f)) x}{8 e^2 f^2 \left (e+f x^2\right )}+\frac {(b e (3 d e+c f)+a f (d e+3 c f)) \tan ^{-1}\left (\frac {\sqrt {f} x}{\sqrt {e}}\right )}{8 e^{5/2} f^{5/2}}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]
time = 0.06, size = 130, normalized size = 1.00 \begin {gather*} \frac {(b e-a f) (d e-c f) x}{4 e f^2 \left (e+f x^2\right )^2}+\frac {(b e (-5 d e+c f)+a f (d e+3 c f)) x}{8 e^2 f^2 \left (e+f x^2\right )}+\frac {(b e (3 d e+c f)+a f (d e+3 c f)) \tan ^{-1}\left (\frac {\sqrt {f} x}{\sqrt {e}}\right )}{8 e^{5/2} f^{5/2}} \end {gather*}

Antiderivative was successfully verified.

[In]

Integrate[((a + b*x^2)*(c + d*x^2))/(e + f*x^2)^3,x]

[Out]

((b*e - a*f)*(d*e - c*f)*x)/(4*e*f^2*(e + f*x^2)^2) + ((b*e*(-5*d*e + c*f) + a*f*(d*e + 3*c*f))*x)/(8*e^2*f^2*
(e + f*x^2)) + ((b*e*(3*d*e + c*f) + a*f*(d*e + 3*c*f))*ArcTan[(Sqrt[f]*x)/Sqrt[e]])/(8*e^(5/2)*f^(5/2))

________________________________________________________________________________________

Maple [A]
time = 0.14, size = 132, normalized size = 1.02

method result size
default \(\frac {\frac {\left (3 a c \,f^{2}+a d e f +b c e f -5 b d \,e^{2}\right ) x^{3}}{8 e^{2} f}+\frac {\left (5 a c \,f^{2}-a d e f -b c e f -3 b d \,e^{2}\right ) x}{8 e \,f^{2}}}{\left (f \,x^{2}+e \right )^{2}}+\frac {\left (3 a c \,f^{2}+a d e f +b c e f +3 b d \,e^{2}\right ) \arctan \left (\frac {f x}{\sqrt {f e}}\right )}{8 e^{2} f^{2} \sqrt {f e}}\) \(132\)
risch \(\frac {\frac {\left (3 a c \,f^{2}+a d e f +b c e f -5 b d \,e^{2}\right ) x^{3}}{8 e^{2} f}+\frac {\left (5 a c \,f^{2}-a d e f -b c e f -3 b d \,e^{2}\right ) x}{8 e \,f^{2}}}{\left (f \,x^{2}+e \right )^{2}}-\frac {3 \ln \left (f x +\sqrt {-f e}\right ) a c}{16 \sqrt {-f e}\, e^{2}}-\frac {\ln \left (f x +\sqrt {-f e}\right ) a d}{16 \sqrt {-f e}\, f e}-\frac {\ln \left (f x +\sqrt {-f e}\right ) b c}{16 \sqrt {-f e}\, f e}-\frac {3 \ln \left (f x +\sqrt {-f e}\right ) b d}{16 \sqrt {-f e}\, f^{2}}+\frac {3 \ln \left (-f x +\sqrt {-f e}\right ) a c}{16 \sqrt {-f e}\, e^{2}}+\frac {\ln \left (-f x +\sqrt {-f e}\right ) a d}{16 \sqrt {-f e}\, f e}+\frac {\ln \left (-f x +\sqrt {-f e}\right ) b c}{16 \sqrt {-f e}\, f e}+\frac {3 \ln \left (-f x +\sqrt {-f e}\right ) b d}{16 \sqrt {-f e}\, f^{2}}\) \(293\)

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((b*x^2+a)*(d*x^2+c)/(f*x^2+e)^3,x,method=_RETURNVERBOSE)

[Out]

(1/8*(3*a*c*f^2+a*d*e*f+b*c*e*f-5*b*d*e^2)/e^2/f*x^3+1/8*(5*a*c*f^2-a*d*e*f-b*c*e*f-3*b*d*e^2)/e/f^2*x)/(f*x^2
+e)^2+1/8*(3*a*c*f^2+a*d*e*f+b*c*e*f+3*b*d*e^2)/e^2/f^2/(f*e)^(1/2)*arctan(f*x/(f*e)^(1/2))

________________________________________________________________________________________

Maxima [A]
time = 0.56, size = 140, normalized size = 1.08 \begin {gather*} \frac {{\left (3 \, a c f^{2} + 3 \, b d e^{2} + {\left (b c e + a d e\right )} f\right )} \arctan \left (\sqrt {f} x e^{\left (-\frac {1}{2}\right )}\right ) e^{\left (-\frac {5}{2}\right )}}{8 \, f^{\frac {5}{2}}} + \frac {{\left (3 \, a c f^{3} - 5 \, b d f e^{2} + {\left (b c e + a d e\right )} f^{2}\right )} x^{3} + {\left (5 \, a c f^{2} e - 3 \, b d e^{3} - {\left (b c e^{2} + a d e^{2}\right )} f\right )} x}{8 \, {\left (f^{4} x^{4} e^{2} + 2 \, f^{3} x^{2} e^{3} + f^{2} e^{4}\right )}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((b*x^2+a)*(d*x^2+c)/(f*x^2+e)^3,x, algorithm="maxima")

[Out]

1/8*(3*a*c*f^2 + 3*b*d*e^2 + (b*c*e + a*d*e)*f)*arctan(sqrt(f)*x*e^(-1/2))*e^(-5/2)/f^(5/2) + 1/8*((3*a*c*f^3
- 5*b*d*f*e^2 + (b*c*e + a*d*e)*f^2)*x^3 + (5*a*c*f^2*e - 3*b*d*e^3 - (b*c*e^2 + a*d*e^2)*f)*x)/(f^4*x^4*e^2 +
 2*f^3*x^2*e^3 + f^2*e^4)

________________________________________________________________________________________

Fricas [A]
time = 0.96, size = 469, normalized size = 3.61 \begin {gather*} \left [\frac {6 \, a c f^{4} x^{3} e - 6 \, b d f x e^{4} - {\left (3 \, a c f^{4} x^{4} + 3 \, b d e^{4} + {\left (6 \, b d f x^{2} + {\left (b c + a d\right )} f\right )} e^{3} + {\left (3 \, b d f^{2} x^{4} + 2 \, {\left (b c + a d\right )} f^{2} x^{2} + 3 \, a c f^{2}\right )} e^{2} + {\left ({\left (b c + a d\right )} f^{3} x^{4} + 6 \, a c f^{3} x^{2}\right )} e\right )} \sqrt {-f e} \log \left (\frac {f x^{2} - 2 \, \sqrt {-f e} x - e}{f x^{2} + e}\right ) - 2 \, {\left (5 \, b d f^{2} x^{3} + {\left (b c + a d\right )} f^{2} x\right )} e^{3} + 2 \, {\left ({\left (b c + a d\right )} f^{3} x^{3} + 5 \, a c f^{3} x\right )} e^{2}}{16 \, {\left (f^{5} x^{4} e^{3} + 2 \, f^{4} x^{2} e^{4} + f^{3} e^{5}\right )}}, \frac {3 \, a c f^{4} x^{3} e - 3 \, b d f x e^{4} + {\left (3 \, a c f^{4} x^{4} + 3 \, b d e^{4} + {\left (6 \, b d f x^{2} + {\left (b c + a d\right )} f\right )} e^{3} + {\left (3 \, b d f^{2} x^{4} + 2 \, {\left (b c + a d\right )} f^{2} x^{2} + 3 \, a c f^{2}\right )} e^{2} + {\left ({\left (b c + a d\right )} f^{3} x^{4} + 6 \, a c f^{3} x^{2}\right )} e\right )} \sqrt {f} \arctan \left (\sqrt {f} x e^{\left (-\frac {1}{2}\right )}\right ) e^{\frac {1}{2}} - {\left (5 \, b d f^{2} x^{3} + {\left (b c + a d\right )} f^{2} x\right )} e^{3} + {\left ({\left (b c + a d\right )} f^{3} x^{3} + 5 \, a c f^{3} x\right )} e^{2}}{8 \, {\left (f^{5} x^{4} e^{3} + 2 \, f^{4} x^{2} e^{4} + f^{3} e^{5}\right )}}\right ] \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((b*x^2+a)*(d*x^2+c)/(f*x^2+e)^3,x, algorithm="fricas")

[Out]

[1/16*(6*a*c*f^4*x^3*e - 6*b*d*f*x*e^4 - (3*a*c*f^4*x^4 + 3*b*d*e^4 + (6*b*d*f*x^2 + (b*c + a*d)*f)*e^3 + (3*b
*d*f^2*x^4 + 2*(b*c + a*d)*f^2*x^2 + 3*a*c*f^2)*e^2 + ((b*c + a*d)*f^3*x^4 + 6*a*c*f^3*x^2)*e)*sqrt(-f*e)*log(
(f*x^2 - 2*sqrt(-f*e)*x - e)/(f*x^2 + e)) - 2*(5*b*d*f^2*x^3 + (b*c + a*d)*f^2*x)*e^3 + 2*((b*c + a*d)*f^3*x^3
 + 5*a*c*f^3*x)*e^2)/(f^5*x^4*e^3 + 2*f^4*x^2*e^4 + f^3*e^5), 1/8*(3*a*c*f^4*x^3*e - 3*b*d*f*x*e^4 + (3*a*c*f^
4*x^4 + 3*b*d*e^4 + (6*b*d*f*x^2 + (b*c + a*d)*f)*e^3 + (3*b*d*f^2*x^4 + 2*(b*c + a*d)*f^2*x^2 + 3*a*c*f^2)*e^
2 + ((b*c + a*d)*f^3*x^4 + 6*a*c*f^3*x^2)*e)*sqrt(f)*arctan(sqrt(f)*x*e^(-1/2))*e^(1/2) - (5*b*d*f^2*x^3 + (b*
c + a*d)*f^2*x)*e^3 + ((b*c + a*d)*f^3*x^3 + 5*a*c*f^3*x)*e^2)/(f^5*x^4*e^3 + 2*f^4*x^2*e^4 + f^3*e^5)]

________________________________________________________________________________________

Sympy [B] Leaf count of result is larger than twice the leaf count of optimal. 246 vs. \(2 (122) = 244\).
time = 1.62, size = 246, normalized size = 1.89 \begin {gather*} - \frac {\sqrt {- \frac {1}{e^{5} f^{5}}} \cdot \left (3 a c f^{2} + a d e f + b c e f + 3 b d e^{2}\right ) \log {\left (- e^{3} f^{2} \sqrt {- \frac {1}{e^{5} f^{5}}} + x \right )}}{16} + \frac {\sqrt {- \frac {1}{e^{5} f^{5}}} \cdot \left (3 a c f^{2} + a d e f + b c e f + 3 b d e^{2}\right ) \log {\left (e^{3} f^{2} \sqrt {- \frac {1}{e^{5} f^{5}}} + x \right )}}{16} + \frac {x^{3} \cdot \left (3 a c f^{3} + a d e f^{2} + b c e f^{2} - 5 b d e^{2} f\right ) + x \left (5 a c e f^{2} - a d e^{2} f - b c e^{2} f - 3 b d e^{3}\right )}{8 e^{4} f^{2} + 16 e^{3} f^{3} x^{2} + 8 e^{2} f^{4} x^{4}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((b*x**2+a)*(d*x**2+c)/(f*x**2+e)**3,x)

[Out]

-sqrt(-1/(e**5*f**5))*(3*a*c*f**2 + a*d*e*f + b*c*e*f + 3*b*d*e**2)*log(-e**3*f**2*sqrt(-1/(e**5*f**5)) + x)/1
6 + sqrt(-1/(e**5*f**5))*(3*a*c*f**2 + a*d*e*f + b*c*e*f + 3*b*d*e**2)*log(e**3*f**2*sqrt(-1/(e**5*f**5)) + x)
/16 + (x**3*(3*a*c*f**3 + a*d*e*f**2 + b*c*e*f**2 - 5*b*d*e**2*f) + x*(5*a*c*e*f**2 - a*d*e**2*f - b*c*e**2*f
- 3*b*d*e**3))/(8*e**4*f**2 + 16*e**3*f**3*x**2 + 8*e**2*f**4*x**4)

________________________________________________________________________________________

Giac [A]
time = 1.15, size = 135, normalized size = 1.04 \begin {gather*} \frac {{\left (3 \, a c f^{2} + b c f e + a d f e + 3 \, b d e^{2}\right )} \arctan \left (\sqrt {f} x e^{\left (-\frac {1}{2}\right )}\right ) e^{\left (-\frac {5}{2}\right )}}{8 \, f^{\frac {5}{2}}} + \frac {{\left (3 \, a c f^{3} x^{3} + b c f^{2} x^{3} e + a d f^{2} x^{3} e - 5 \, b d f x^{3} e^{2} + 5 \, a c f^{2} x e - b c f x e^{2} - a d f x e^{2} - 3 \, b d x e^{3}\right )} e^{\left (-2\right )}}{8 \, {\left (f x^{2} + e\right )}^{2} f^{2}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((b*x^2+a)*(d*x^2+c)/(f*x^2+e)^3,x, algorithm="giac")

[Out]

1/8*(3*a*c*f^2 + b*c*f*e + a*d*f*e + 3*b*d*e^2)*arctan(sqrt(f)*x*e^(-1/2))*e^(-5/2)/f^(5/2) + 1/8*(3*a*c*f^3*x
^3 + b*c*f^2*x^3*e + a*d*f^2*x^3*e - 5*b*d*f*x^3*e^2 + 5*a*c*f^2*x*e - b*c*f*x*e^2 - a*d*f*x*e^2 - 3*b*d*x*e^3
)*e^(-2)/((f*x^2 + e)^2*f^2)

________________________________________________________________________________________

Mupad [B]
time = 0.97, size = 136, normalized size = 1.05 \begin {gather*} \frac {\mathrm {atan}\left (\frac {\sqrt {f}\,x}{\sqrt {e}}\right )\,\left (3\,a\,c\,f^2+3\,b\,d\,e^2+a\,d\,e\,f+b\,c\,e\,f\right )}{8\,e^{5/2}\,f^{5/2}}-\frac {\frac {x\,\left (3\,b\,d\,e^2-5\,a\,c\,f^2+a\,d\,e\,f+b\,c\,e\,f\right )}{8\,e\,f^2}-\frac {x^3\,\left (3\,a\,c\,f^2-5\,b\,d\,e^2+a\,d\,e\,f+b\,c\,e\,f\right )}{8\,e^2\,f}}{e^2+2\,e\,f\,x^2+f^2\,x^4} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(((a + b*x^2)*(c + d*x^2))/(e + f*x^2)^3,x)

[Out]

(atan((f^(1/2)*x)/e^(1/2))*(3*a*c*f^2 + 3*b*d*e^2 + a*d*e*f + b*c*e*f))/(8*e^(5/2)*f^(5/2)) - ((x*(3*b*d*e^2 -
 5*a*c*f^2 + a*d*e*f + b*c*e*f))/(8*e*f^2) - (x^3*(3*a*c*f^2 - 5*b*d*e^2 + a*d*e*f + b*c*e*f))/(8*e^2*f))/(e^2
 + f^2*x^4 + 2*e*f*x^2)

________________________________________________________________________________________